package org.dreamwork.floatingball.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

import org.dreamwork.floatingball.R;

/**
 * Created by seth.yang on 2017/3/31
 */

public class ConfirmPanel extends LinearLayout {

    private View btnPowerOff, btnReboot;

    public ConfirmPanel (Context context) {
        super (context);
    }

    public ConfirmPanel (Context context, AttributeSet attrs) {
        super (context, attrs);
    }

    public ConfirmPanel (Context context, AttributeSet attrs, int defStyleAttr) {
        super (context, attrs, defStyleAttr);
    }

    public void setOnPowerOffListener (OnClickListener onOkListener) {
        btnPowerOff.setOnClickListener (onOkListener);
    }

    public void setOnRebootListener (OnClickListener onCancelListener) {
        btnReboot.setOnClickListener (onCancelListener);
    }

    public void guiInit () {
        btnPowerOff = findViewById (R.id.btn_power_off);
        btnReboot   = findViewById (R.id.btn_reboot);
    }
}